
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 0136
 * @Author : WangRuoyu 
 * @Date : 2023/5/27 16:44
 */

#include "iostream"
#include "vector"
#include "unordered_set"

using namespace std;

class Solution {
public:
    int singleNumber(vector<int> &nums) {
        int res = 0;
        for (int i: nums) {
            res ^= i;
        }
        return res;
    }
};

int main() {
    Solution sl;
    vector<int> nums = {4, 1, 2, 1, 2};
    printf("%d", sl.singleNumber(nums));
    return 0;
}